import { configureStore } from '@reduxjs/toolkit'

// import router  from "./modules/router";
import * as reducer from './reducers'

const store = configureStore({
  reducer: {
    // 注册，注意名字要与counterSlice.ts中的name一致
    // counter:counterStore,
   ...reducer
  },
})

// 后续使用useSelector时参数state的类型
export type RootState = ReturnType<typeof store.getState>
export type AppDispatch = typeof store.dispatch

export default store
